package com.example.demo.Test;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "student")   //必须小写，再SpringBoot的配置中只能是小写
public class Student {      //通过SpringBoot可以配置对象
    Integer id;
    String name;
    String num;
}
